package po;

import com.mchange.v2.c3p0.ComboPooledDataSource;
import javax.sql.DataSource;

/**
 * Create By IntelliJ IDEA
 *
 * @author: jsonor
 * @create-Time: 2017/10/17 8:23
 * @description: 连接池管理类
 */
public class DataSourceFactory {

  private final static DataSource INSTANCE;

  static {
    INSTANCE = new ComboPooledDataSource();
  }

  /**
   * 获取一个DataSource, c3p0连接池管理
   *
   * @return DataSource的接口
   */
  public static DataSource getDataSource() {
    return INSTANCE;
  }
}
